/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author zhanglei
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface Vnotice extends BasicModel<Vnotice> {
  noticeId?: string; // notice_id
  title?: string; // 公告标题
  content?: string; // 公告内容
}

export const vnoticeList = (params?: Vnotice | any) =>
  defHttp.get<Vnotice>({ url: adminPath + '/vke/vnotice/list', params });

export const vnoticeListData = (params?: Vnotice | any) =>
  defHttp.post<Page<Vnotice>>({ url: adminPath + '/vke/vnotice/listData', params });

export const vnoticeForm = (params?: Vnotice | any) =>
  defHttp.get<Vnotice>({ url: adminPath + '/vke/vnotice/form', params });

export const vnoticeSave = (params?: any, data?: Vnotice | any) =>
  defHttp.postJson<Vnotice>({ url: adminPath + '/vke/vnotice/save', params, data });

export const vnoticeDelete = (params?: Vnotice | any) =>
  defHttp.get<Vnotice>({ url: adminPath + '/vke/vnotice/delete', params });
